package org.rency.ues.domain.request;

import org.apache.commons.lang.builder.ReflectionToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Size;

/**
 * 创建证书请求
 *
 * @author: Created by user_rcy@163.com on 2016/07/31.
 * @version: V1.0.0
 * @since JDK 1.8
 */
public class CreateCertificationRequest extends BaseRequest{

    private final String[]      ToStringExcludes         = { "password"};

    /**
     * 证书别名
     */
    @NotNull(message = "证书别名不能为空")
    private String aliasName;

    /**
     * 证书密码
     */
    @NotNull(message = "证书密码不能为空")
    @Size(min = 6,max = 7,message = "证书密码最小6位，最大7位")
    private String password;

    /**
     * 机构名称
     */
    @NotNull(message = "机构简要名称不能为空")
    private String orgiSimpleName;

    /**
     * 机构Email
     */
    @NotNull(message = "机构邮件地址不能为空")
    private String orgiEmail;

    public String getAliasName() {
        return aliasName;
    }

    public void setAliasName(String aliasName) {
        this.aliasName = aliasName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getOrgiSimpleName() {
        return orgiSimpleName;
    }

    public void setOrgiSimpleName(String orgiSimpleName) {
        this.orgiSimpleName = orgiSimpleName;
    }

    public String getOrgiEmail() {
        return orgiEmail;
    }

    public void setOrgiEmail(String orgiEmail) {
        this.orgiEmail = orgiEmail;
    }

    @Override
    public String toString(){
        return new ReflectionToStringBuilder(this, ToStringStyle.SHORT_PREFIX_STYLE).setExcludeFieldNames(ToStringExcludes).toString();
    }

}